##title=Loads a component with the specified identity over the entire portal
##parameters=identity=None, justURL=False


subpath = ""
if traverse_subpath:
    identity = traverse_subpath[0]
    traverse_subpath = traverse_subpath[1:]
            
    subpath = "/".join( traverse_subpath )
    
    qs = context.REQUEST.get('QUERY_STRING',None)
    if qs:
        subpath += "?" + qs
    

#return identity

component = context.getComponentByIdentity( identity )



if component:
    
    url = component.absolute_url() + "/" + subpath
    
    
    if justURL:
        return url
    else:
        return context.REQUEST.RESPONSE.redirect( url )
    